/**
 * 待废弃，替换为新Avatar后废弃
 */
/* eslint-disable */
// 封面规范 https://yuque.antfin-inc.com/aoneux/haizbu/qw0h1g
import * as React from 'react';

import './index.scss';

interface ICoverProps extends React.HTMLAttributes<HTMLElement> {
  size?: 'small' | 'medium' | 'large';
  type?: 'normal' | 'icon';
  img?: string;
  icon?: React.ReactNode;
}

const prefix = 'teamix-cover';

const Cover: React.FC<ICoverProps> = ({
  size = 'medium',
  type = 'normal',
  img,
  icon,
  className,
  ...others
}) => {
  return (
    <div
      className={`${prefix} ${prefix}-type-${type} ${prefix}-size-${size} ${className || ''}`}
      {...others}
    >
      {type === 'normal' ? <img src={img} alt="封面" /> : null}
      {type === 'icon' ? icon : null}
    </div>
  );
};

export default Cover;
